#-*-coding:utf-8-*-
#从1~n中，随机取m个数。1<=m<=n
import random
print(u'请输入取数的范围1~n')
n = int(input())
print(u'请输入取数的个数')
m = int(input())

a = range(1,n+1)
s = random.sample(a,m)
if 1<=m<=n:
    print s
else:
    print u'输入错误'